﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SaleLibrary.Sale;

namespace SaleLibrary.License
{
    public class ActiveCodeSend
    {
        public static string GetMailBody(ActiveCode ac)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("您好:");
            sb.Append(Environment.NewLine);
            sb.Append("    欢迎使用美联达保险展业软件.");
            sb.Append(Environment.NewLine);
            sb.Append("    这是本产品的注册码:");
            sb.Append(Environment.NewLine);
            sb.Append(ac.Code);
            sb.Append(Environment.NewLine);
            sb.Append("    请在");
            sb.Append(ac.RegPeriod);
            sb.Append("    天内注册,否则失效!");
            sb.Append("    请妥善保管好该激活码，不要外泄!");
            sb.Append(Environment.NewLine);
            sb.Append(Environment.NewLine);
            sb.Append("    美联达软件");

            return sb.ToString();
        }

        public virtual int Id { get; set; }

        public virtual ActiveCode ActiveCode { get; set; }

        public virtual IClient Sender { get; set; }

        public virtual DateTime SendTime { get; set; }

        public virtual string SendMail { get; set; }

        public virtual string Mail { get; set; }

        public virtual string Mobile { get; set; }

        public virtual string MailSubject { get; set; }

        public virtual string MailBody { get; set; }

        public virtual string MobileMessage { get; set; }

        public virtual bool IsSend { get { return Id == 0 ? false : true; } }
    }
}
